package org.jeecg.modules.bobo.wechat.common.service;

import com.github.binarywang.wxpay.bean.entpay.EntPayResult;
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
import com.github.binarywang.wxpay.bean.notify.WxPayRefundNotifyResult;
import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult;
import com.github.binarywang.wxpay.bean.result.WxPayRefundResult;
import com.github.binarywang.wxpay.exception.WxPayException;
import org.jeecg.modules.bobo.common.util.Result;
import org.jeecg.modules.bobo.wechat.common.entity.IWxPayApiEntity;

public interface IWxPayApiService<T extends IWxPayApiEntity> {
    WxPayMpOrderResult  payOrder(T t);
    boolean payOrderHandle(T t);
    WxPayRefundResult refundOrder(T t);
    boolean refundOrderHandle(T t);
    boolean  payNotifyHandle(WxPayOrderNotifyResult orderNotifyResult);
    boolean notifyRefundHandle(WxPayRefundNotifyResult refundNotifyResult);

    Result<EntPayResult> entPay(T t) throws WxPayException;
    boolean entPayHandle(T t,EntPayResult wxEntPayResult);

    String payNotify(String xmlData);

    String notifyRefund(String xmlData);

}
